package com.yc.chaoshi.cs_manage.DTO;


import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;


import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;



public class AdminDTO  implements Serializable {
    @NotNull(message = "权限不能为空")
    private  String rolename;

    private Integer id;

    /**
     * 邮箱
     */
    @Email
    private String email;

    /**
     * 用户名就是手机号
     */
    @NotNull(message = "用户名不能为空")
    private String username;


    /**
     * 权限
     */
    private String post;


    /**
     * 密码
     */
    @NotNull(message = "密码不能为空")
    private String password;

    /**
     * 电话
     */
    @Pattern(message = "电话格式错误",regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$")
    @NotNull(message = "电话不能为空")
    private String phone;

    /**
     * 个性签名
     */
    private String sign;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8",shape = JsonFormat.Shape.STRING)
    private LocalDateTime createTime;


    /**
     * 账号启用状态（0禁用 1启用）
     */
    private Integer status;


    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
